home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9209.ARJ / 1009102B < prev    next >
Text File  |  1992-07-07  |  242b  |  19 lines

  1.  
  2. Listing 4
  3.  
  4. String &String::operator=(const String &s)
  5.     {
  6.     if (len != s.len)
  7.         {
  8.         delete [] str;
  9.         len = s.len;
  10.         str = new char[len + 1];
  11.         }
  12.     strcpy(str, s.str);
  13.     return *this;
  14.     }
  15.  
  16. ----------
  17.  
  18.  
  19.